<template>
  <div class="songList-middle">
        <ul>
          <li v-for="item in props.songData" :key="item.id">
            <div>
              <div class="songList-middle-imgContainer">
                <img :src="item.coverImgUrl">
                <div>
                  <div>
                    <i></i>
                    <span>123</span>
                  </div>
                  <a></a>
                </div>
              </div>
              <a :title="item.name">{{item.name}}</a>
              <div class="songList-middle-subscriber">
                <span>by</span>
                <a>{{item.subscribers[0].nickname}}</a>
                <img src="https://p5.music.126.net/obj/wo3DlcOGw6DClTvDisK1/4761340168/ccce/35dd/ab2d/1a7c8ee0f6bb1fc2760cbb570dfee34f.png">
              </div>
            </div>
          </li>
        </ul>
      </div>
</template>

<script>
export default {
  name: "SongView"
}
</script>

<script setup>
import { defineProps } from 'vue'

const props = defineProps(['songData'])
</script>

<style scoped>
.songList-middle{
  width: 100%;
}
.songList-middle-imgContainer{
  position: relative;
  width: 140px;
  height: 140px;
}
.songList-middle-imgContainer>img{
  width: 140px;
  height: 140px;
}
.songList-middle-imgContainer>div{
  position:absolute;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  box-sizing: border-box;
  bottom: 0;
  width: 100%;
  height: 27px;
  color: #ccc;
  background: url(https://s2.music.126.net/style/web2/img/coverall.png?faaf1474e4ce11fcad702bbc6944cfcf) no-repeat;
  background-position: 0 -537px;
}
.songList-middle-imgContainer>div>div{
  display: flex;
  align-items: center;
}
.songList-middle-imgContainer>div>div>i{
  display: inline-block;
  width: 14px;
  height: 11px;
  padding-right: 4px;
  background: url(https://s2.music.126.net/style/web2/img/iconall.png?ef315ba593b94fd5ea495fc5d393d962) no-repeat;
  background-position: 0 -24px;
}
.songList-middle-imgContainer>div>a{
  display: inline-block;
  width: 16px;
  height: 17px;
  background: url(https://s2.music.126.net/style/web2/img/iconall.png?ef315ba593b94fd5ea495fc5d393d962) no-repeat;
}

.songList-middle>ul{
  display: flex;
  flex-wrap: wrap;
  width: 950px;
  margin: 30px 0;
}
.songList-middle>ul>li{
  width: 20%;
  padding-bottom: 30px;
}
.songList-middle>ul>li>div{
  width: 140px;
}
.songList-middle>ul>li>div>a{
  display: block;
  padding: 4px 0;
  font-size: 14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  cursor: pointer;
}
.songList-middle>ul>li>div>a:hover{
  text-decoration: underline;
}
.songList-middle-subscriber{
  display: flex;
}
.songList-middle-subscriber>span{
  margin-right: 4px;
}
.songList-middle-subscriber>a{
  display: block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  cursor: pointer;
  margin-right: 4px;
}
.songList-middle-subscriber>a:hover{
  text-decoration: underline;
}
.songList-middle-subscriber>img{
  height: 13px;
  width: 13px;
}
</style>